/*
Problematic modules: {
    "skins.minerva.base.reset": "missing",
    "skins.minerva.content.styles": "missing",
    "ext.cite.style": "missing",
    "mobile.app.pagestyles.android": "missing"
}
*/
/*
MediaWiki:Common.css
*/
/*
 * Override https://github.com/archlinux/archwiki/blob/master/resources/src/mediawiki.skinning/elements.less#L182
 * which was introduced in MediaWiki because of at least https://phabricator.wikimedia.org/T2260 and https://phabricator.wikimedia.org/T103780
 * but those problems should not affect us
 */

pre,
.mw-code {
    white-space: pre;
}


/*
 * Remove icon from links to wiki.archlinux.org because they are sometimes
 * used for example to link to edit diffs or in status templates for the
 * "Discuss" link
 */

#bodyContent a.external[href ^="http://wiki.archlinux.org"],
#bodyContent a.external[href ^="https://wiki.archlinux.org"] {
    background: none;
    padding-right: 0;
}


/* Template:Pkg, Template:AUR, Template:Grp, Template:Man */

span.archwiki-template-pkg,
span.archwiki-template-man {
    font-family: monospace, monospace;
}


/* Note, Warning, Tip templates */

div.archwiki-template-box {
    padding: 5px;
    border: thin solid black;
    margin: 0.5em 0;
    overflow: hidden;
}
div.archwiki-template-box.archwiki-template-box-note {
    background-color: #ddf;
    border-color: #bbd;
}
div.archwiki-template-box.archwiki-template-box-warning {
    background-color: #fdd;
    border-color: #dbb;
}
div.archwiki-template-box.archwiki-template-box-tip {
    background-color: #dfd;
    border-color: #bdb;
}


/* Status templates */

div.archwiki-template-message {
    position: relative;
    overflow: hidden; /* This e.g. prevents the template from overlapping the related articles box;
                         using 'auto' would display a vertical scrollbar in e.g. Chromium and Opera:
                         increasing min-height would fix it too, but this seems safer and more elegant */
    min-height: 4.6em; /* Needed to better host the two icons at the sides */
    margin-bottom: 1em;
    background-color: #f9faff;
    border: 1px solid #d7dfe3;
    padding: 0 100px;
    text-align: center;
}
div.archwiki-template-message > p > a {
    display: block;
    position: absolute;
    top: 5px;
}
div.archwiki-template-message > p > a:first-of-type {
    left: 26px; /* the icon is 48px, centering in the 100px padding */
}
div.archwiki-template-message > p > a:last-of-type {
    right: 26px; /* the icon is 48px, centering in the 100px padding */
}
div.archwiki-template-message > div {
    font-size: 90%;
}
div.archwiki-template-message ul,
div.archwiki-template-message ol {
    text-align: left;
}


/* Related articles templates */

div.archwiki-template-meta-related-articles-start {
    float: right;
    clear: right;
    width: 25%;
    margin: 0 0 0.5em 0.5em;
}
div.archwiki-template-meta-related-articles-start > p {
    background: #333;
    color: white;
    padding: 0.2em;
    border-bottom:5px #08c solid;
    margin:0;
    text-align:center;
    font-weight:bold;
}
div.archwiki-template-meta-related-articles-start > ul {
    list-style-type: none;
    list-style-image: none;
    /* Resetting the margin of ul is necessary for compatibility among browsers */
    margin: 0;
    padding: 0.3em;
}
div.archwiki-template-meta-related-articles-start > ul > li {
    padding: 0.4em 0;
    /* line-height:1 makes wrapped long links distinguishable */
    line-height: 1;
}


/*
 * Main Page columns
 * Keep coherent with https://github.com/archlinux/archwiki/search?q=width-breakpoint-tablet
 */

@media screen and ( min-width: 721px ) {
    div.archwiki-main-page-columns {
        column-count: 2;
    }
    div.archwiki-main-page-columns > * {
        page-break-inside: avoid;
        /* fix alignment of list items in multi-column layout, see https://stackoverflow.com/a/42349512 */
        display: inline-block;
        width: 100%;
    }
}


/*
 * Override syntax highlighting style
 * (CodeMirror should just highlight, not change the size of elements)
 */

#content .CodeMirror pre {
    line-height: 1.5em;
}
#content pre.cm-mw-section-1,
#content pre.cm-mw-section-2 {
    line-height: 1.5em;
    font-size: inherit;
    font-weight: bold;
}
#content .cm-mw-pagename {
    /* avoid underlining which obfuscates underscores */
    text-decoration: unset;
}


/*
 * Override font size of section headings to improve readability
 *
 * Vector's font size for h4 is 100%, just like regular paragraphs, which makes
 * the heading indiscernible from regular bolded text.
 */
 
.mw-body-content h1 { font-size: 188%; }
.mw-body-content h2 { font-size: 150%; }
.mw-body-content h3 { font-size: 128%; }
.mw-body-content h4 { font-size: 116%; }
.mw-body-content h5 { font-size: 108%; }
.mw-body-content h6 { font-size: 100%; }


/*
 * Add anonymous replaced elements to auto-number sections
 *
 * (This feature was removed in MediaWiki 1.38 for "performance reasons",
 * see https://www.mediawiki.org/wiki/MediaWiki_1.38#Other_changes )
 *
 * Note that MediaWiki does not have nested DOM elements for sections, so we
 * cannot use nested counters and have to hack it with several counters per
 * each level.
 *
 * Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Counter_Styles/Using_CSS_counters
 */

/* Create counters and set their initial value to 0. */
body {
  counter-reset: h2-section h3-section h4-section h5-section h6-section;
}

/* Set up resetting */
/* (note that counter-reset does not work) */
h2 > .mw-headline
{
  counter-increment: h2-section;
  counter-set: h3-section h4-section h5-section h6-section;
}
h3 > .mw-headline
{
  counter-increment: h3-section;
  counter-set: h4-section h5-section h6-section;
}
h4 > .mw-headline
{
  counter-increment: h4-section;
  counter-set: h5-section h6-section;
}
h5 > .mw-headline
{
  counter-increment: h5-section;
  counter-set: h6-section;
}
h6 > .mw-headline
{
  counter-increment: h6-section;
}

/* Display the counters in the headings */
h2 > .mw-headline::before
{
  content: counter(h2-section);
}
h3 > .mw-headline::before
{
  content: counter(h2-section) "." counter(h3-section);
}
h4 > .mw-headline::before
{
  content: counter(h2-section) "." counter(h3-section) "." counter(h4-section);
}
h5 > .mw-headline::before
{
  content: counter(h2-section) "." counter(h3-section) "." counter(h4-section) "." counter(h5-section);
}
h6 > .mw-headline::before
{
  content: counter(h2-section) "." counter(h3-section) "." counter(h4-section) "." counter(h5-section) "." counter(h6-section);
}
h2 > .mw-headline::before,
h3 > .mw-headline::before,
h4 > .mw-headline::before,
h5 > .mw-headline::before,
h6 > .mw-headline::before
{
  color: #6b3e26;
  font-style: italic;
  margin-right: 1ex;
}


/* move category links to the top */
body:not(.page-Main_page) #bodyContent{
    display: flex;
    flex-direction: column; 
}
body:not(.page-Main_page) #contentSub {
    order: -2;
    margin-bottom: 0;
}
body:not(.page-Main_page) #catlinks {
    order: -1;
    /* The margin-bottom is consistent with div.archwiki-template-message */
    margin: 0.5em 0 1em;
}

body:not(.page-Main_page) p:first-child, .archwiki-template-meta-related-articles-start + p{
    margin-top: 0;
}

/* hide stupid empty div which causes large margin between the category links and content */
#contentSub:empty, #contentSub2:empty {
    display: none;
}


/*
 * easter egg
 */
#firstHeading .pacman-wrapper {
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 80%;
}

#firstHeading .pacman {
  position: relative;
  background: transparent;
  z-index: 1;
  height: 36px;
}
#firstHeading .pacman::before, #firstHeading .pacman::after {
  position: absolute;
  display: block;
  border-radius: 50%;
  content: "";
  height: 0px;
  width: 0px;
}
#firstHeading .pacman::before {
  animation: pacman-jaw-top 0.5s ease infinite;
  animation-delay: 0.1s;
  border: 18px solid #FFCC00;
  border-left-color: transparent;
  border-bottom-color: transparent;
}
#firstHeading .pacman::after {
  animation: pacman-jaw-bottom 0.5s ease infinite;
  animation-delay: 0.1s;
  border: 18px solid #FFCC00;
  border-right-color: transparent;
  border-top-color: transparent;
}

#firstHeading .food {
  display: flex;
  justify-content: space-around;
  animation: pacman-food-translation 0.5s linear infinite;
  width: 100%;
}
#firstHeading .food::before {
  background: #fff;
  border: solid 1px;
  border-radius: 50%;
  content: "";
  height: 1rem;
  width: 1rem;
}

@keyframes pacman-jaw-top {
  0%, 100% {
    transform: rotate(-45deg);
  }
  50% {
    transform: rotate(-80deg);
  }
}
@keyframes pacman-jaw-bottom {
  0%, 100% {
    transform: rotate(-45deg);
  }
  50% {
    transform: rotate(0deg);
  }
}
@keyframes pacman-food-translation {
  0% {
    transform: translateX(60%);
  }
  100% {
    transform: translateX(-40%);
  }
}
/* stylelint-disable selector-class-pattern */
/* Galleries */
/* Don't forget to update gallery.print.css */
ul.gallery {
  margin: 2px;
  padding: 2px;
  display: block;
}
li.gallerycaption {
  font-weight: bold;
  text-align: center;
  display: block;
  word-wrap: break-word;
}
li.gallerybox {
  vertical-align: top;
  display: inline-block;
}
li.gallerybox div.thumb {
  text-align: center;
  margin: 2px;
}
li.gallerybox div.thumb img {
  display: block;
  margin: 0 auto;
}
div.gallerytext {
  overflow: hidden;
  font-size: 94%;
  padding: 2px 4px;
  word-wrap: break-word;
}
.galleryfilename {
  display: block;
}
.galleryfilename-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* new gallery stuff */
ul.mw-gallery-nolines li.gallerybox div.thumb {
  background-color: transparent;
  border: 0;
}
ul.mw-gallery-nolines li.gallerybox div.gallerytext {
  text-align: center;
}
/* height constrained gallery */
ul.mw-gallery-packed,
ul.mw-gallery-packed-overlay,
ul.mw-gallery-packed-hover {
  text-align: center;
}
ul.mw-gallery-packed li.gallerybox div.thumb,
ul.mw-gallery-packed-overlay li.gallerybox div.thumb,
ul.mw-gallery-packed-hover li.gallerybox div.thumb {
  background-color: transparent;
  border: 0;
}
ul.mw-gallery-packed li.gallerybox div.thumb img,
ul.mw-gallery-packed-overlay li.gallerybox div.thumb img,
ul.mw-gallery-packed-hover li.gallerybox div.thumb img {
  margin: 0 auto;
}
ul.mw-gallery-packed-hover li.gallerybox,
ul.mw-gallery-packed-overlay li.gallerybox {
  position: relative;
}
ul.mw-gallery-packed-hover div.gallerytextwrapper {
  overflow: hidden;
  height: 0;
}
ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper,
ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper,
ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper {
  position: absolute;
  background: #fff;
  background: rgba(255, 255, 255, 0.8);
  padding: 5px 10px;
  bottom: 0;
  left: 0;
  /* Needed for IE */
  height: auto;
  max-height: 40%;
  overflow: hidden;
  font-weight: bold;
  margin: 2px;
  /* correspond to style on div.thumb */
}
ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper p,
ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper p,
ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper p {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper:hover,
ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper:hover,
ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper:hover {
  overflow: visible;
  max-height: none;
}
ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper:hover p,
ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper:hover p,
ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper:hover p {
  text-overflow: clip;
  white-space: normal;
  overflow: visible;
}
/* Slideshow */
ul.gallery.mw-gallery-slideshow {
  display: block;
  margin: 4em 0;
  /* `li` item */
}
ul.gallery.mw-gallery-slideshow .gallerycaption {
  font-size: 1.3em;
  margin: 0;
}
ul.gallery.mw-gallery-slideshow .gallerycarousel {
  display: block;
  text-align: center;
}
ul.gallery.mw-gallery-slideshow .gallerycarousel.mw-gallery-slideshow-thumbnails-toggled {
  margin-bottom: 1.3em;
}
ul.gallery.mw-gallery-slideshow .mw-gallery-slideshow-buttons {
  opacity: 0.5;
  padding: 1.3em 0;
  white-space: nowrap;
}
ul.gallery.mw-gallery-slideshow .mw-gallery-slideshow-buttons .oo-ui-buttonElement {
  margin: 0 2em;
}
ul.gallery.mw-gallery-slideshow .mw-gallery-slideshow-buttons .oo-ui-buttonElement:first-child {
  margin-left: 0;
}
ul.gallery.mw-gallery-slideshow .mw-gallery-slideshow-buttons .oo-ui-buttonElement:last-child {
  margin-right: 0;
}
ul.gallery.mw-gallery-slideshow .gallerybox.slideshow-current {
  background: #efefef;
}
ul.gallery.mw-gallery-slideshow .gallerybox > div {
  max-width: 120px;
}
ul.gallery.mw-gallery-slideshow .gallerybox div.thumb {
  border: 0;
  background: transparent;
}
.mw-gallery-slideshow-img-container a {
  display: block;
}
@media screen {
  /* Background and border colors are defined separately for print mode */
  li.gallerybox div.thumb {
    border: 1px solid #c8ccd1;
    background-color: #f8f9fa;
  }
}@media print {
	/* stylelint-disable selector-class-pattern */
	li.gallerybox {
	  vertical-align: top;
	  display: inline-block;
	}
	li.gallerybox div.thumb {
	  background-color: #fff;
	  border: 1px solid #ccc;
	}
	ul.gallery {
	  margin: 2px;
	  padding: 2px;
	  display: block;
	}
	li.gallerycaption {
	  font-weight: bold;
	  text-align: center;
	  display: block;
	  word-wrap: break-word;
	}
	div.gallerytext {
	  overflow: visible;
	}
	ul.mw-gallery-packed-hover div.gallerytextwrapper {
	  overflow: visible;
	  height: auto;
	}
	ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper,
	ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper,
	ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper {
	  position: static;
	  background: transparent;
	  padding: 0;
	  max-height: none;
	  overflow: visible;
	  font-weight: normal;
	  margin: 0;
	  /* correspond to style on div.thumb */
	}
	ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper p,
	ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper p,
	ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper p {
	  text-overflow: clip;
	  white-space: normal;
	  overflow: visible;
	}}
/**
 * Style Parsoid HTML+RDFa output consistent with wikitext from PHP parser.
 */
/*
 * Auto-numbered external links
 * Parsoid renders those as link without content, and lets CSS do the
 * counting. This way the counting style can be customized, and counts update
 * automatically when content is modified.
 */
.mw-parser-output {
  counter-reset: mw-numbered-ext-link;
}
.mw-parser-output a[rel~='mw:ExtLink']:empty:after {
  content: '[' counter(mw-numbered-ext-link) ']';
  counter-increment: mw-numbered-ext-link;
}

/**
 * Block media items
 */
figure[typeof~='mw:Image'],
figure[typeof~='mw:Video'],
figure[typeof~='mw:Audio'],
figure[typeof~='mw:Image/Frameless'],
figure[typeof~='mw:Video/Frameless'],
figure[typeof~='mw:Audio/Frameless'] {
  margin: 0;
  /* Hide the caption for frameless and plain floated images */
}
.mw-body-content figure[typeof~='mw:Image'] > a,
.mw-body-content figure[typeof~='mw:Video'] > a,
.mw-body-content figure[typeof~='mw:Audio'] > a,
.mw-body-content figure[typeof~='mw:Image/Frameless'] > a,
.mw-body-content figure[typeof~='mw:Video/Frameless'] > a,
.mw-body-content figure[typeof~='mw:Audio/Frameless'] > a {
  border: 0;
}
figure[typeof~='mw:Image'].mw-halign-right,
figure[typeof~='mw:Video'].mw-halign-right,
figure[typeof~='mw:Audio'].mw-halign-right,
figure[typeof~='mw:Image/Frameless'].mw-halign-right,
figure[typeof~='mw:Video/Frameless'].mw-halign-right,
figure[typeof~='mw:Audio/Frameless'].mw-halign-right {
  /* @noflip */
  margin: 0 0 0.5em 0.5em;
  /* @noflip */
  clear: right;
  /* @noflip */
  float: right;
}
figure[typeof~='mw:Image'].mw-halign-left,
figure[typeof~='mw:Video'].mw-halign-left,
figure[typeof~='mw:Audio'].mw-halign-left,
figure[typeof~='mw:Image/Frameless'].mw-halign-left,
figure[typeof~='mw:Video/Frameless'].mw-halign-left,
figure[typeof~='mw:Audio/Frameless'].mw-halign-left {
  /* @noflip */
  margin: 0 0.5em 0.5em 0;
  /* @noflip */
  clear: left;
  /* @noflip */
  float: left;
}
figure[typeof~='mw:Image'].mw-halign-none,
figure[typeof~='mw:Video'].mw-halign-none,
figure[typeof~='mw:Audio'].mw-halign-none,
figure[typeof~='mw:Image/Frameless'].mw-halign-none,
figure[typeof~='mw:Video/Frameless'].mw-halign-none,
figure[typeof~='mw:Audio/Frameless'].mw-halign-none {
  clear: none;
  float: none;
}
figure[typeof~='mw:Image'].mw-halign-center,
figure[typeof~='mw:Video'].mw-halign-center,
figure[typeof~='mw:Audio'].mw-halign-center,
figure[typeof~='mw:Image/Frameless'].mw-halign-center,
figure[typeof~='mw:Video/Frameless'].mw-halign-center,
figure[typeof~='mw:Audio/Frameless'].mw-halign-center {
  /* Matches *.center * in element.css */
  margin: 0 auto;
  display: table;
  border-collapse: collapse;
  clear: none;
  float: none;
}
figure[typeof~='mw:Image'] > figcaption,
figure[typeof~='mw:Video'] > figcaption,
figure[typeof~='mw:Audio'] > figcaption,
figure[typeof~='mw:Image/Frameless'] > figcaption,
figure[typeof~='mw:Video/Frameless'] > figcaption,
figure[typeof~='mw:Audio/Frameless'] > figcaption {
  display: none;
}
figure[typeof~='mw:Image/Thumb'],
figure[typeof~='mw:Video/Thumb'],
figure[typeof~='mw:Audio/Thumb'],
figure[typeof~='mw:Image/Frame'],
figure[typeof~='mw:Video/Frame'],
figure[typeof~='mw:Audio/Frame'] {
  margin: 0;
  margin-bottom: 0.5em;
  display: table;
  text-align: center;
  border-collapse: collapse;
}
.mw-body-content figure[typeof~='mw:Image/Thumb'] > a,
.mw-body-content figure[typeof~='mw:Video/Thumb'] > a,
.mw-body-content figure[typeof~='mw:Audio/Thumb'] > a,
.mw-body-content figure[typeof~='mw:Image/Frame'] > a,
.mw-body-content figure[typeof~='mw:Video/Frame'] > a,
.mw-body-content figure[typeof~='mw:Audio/Frame'] > a {
  border: 0;
}
.mw-content-ltr figure[typeof~='mw:Image/Thumb'],
.mw-content-ltr figure[typeof~='mw:Video/Thumb'],
.mw-content-ltr figure[typeof~='mw:Audio/Thumb'],
.mw-content-ltr figure[typeof~='mw:Image/Frame'],
.mw-content-ltr figure[typeof~='mw:Video/Frame'],
.mw-content-ltr figure[typeof~='mw:Audio/Frame'] {
  /* @noflip */
  margin: 0.5em 0 1.3em 1.4em;
  /* @noflip */
  clear: right;
  /* @noflip */
  float: right;
}
.mw-content-rtl figure[typeof~='mw:Image/Thumb'],
.mw-content-rtl figure[typeof~='mw:Video/Thumb'],
.mw-content-rtl figure[typeof~='mw:Audio/Thumb'],
.mw-content-rtl figure[typeof~='mw:Image/Frame'],
.mw-content-rtl figure[typeof~='mw:Video/Frame'],
.mw-content-rtl figure[typeof~='mw:Audio/Frame'] {
  /* @noflip */
  margin: 0.5em 1.4em 1.3em 0;
  /* @noflip */
  clear: left;
  /* @noflip */
  float: left;
}
figure[typeof~='mw:Image/Thumb'].mw-halign-right,
figure[typeof~='mw:Video/Thumb'].mw-halign-right,
figure[typeof~='mw:Audio/Thumb'].mw-halign-right,
figure[typeof~='mw:Image/Frame'].mw-halign-right,
figure[typeof~='mw:Video/Frame'].mw-halign-right,
figure[typeof~='mw:Audio/Frame'].mw-halign-right {
  /* @noflip */
  margin: 0.5em 0 1.3em 1.4em;
  /* @noflip */
  clear: right;
  /* @noflip */
  float: right;
}
figure[typeof~='mw:Image/Thumb'].mw-halign-left,
figure[typeof~='mw:Video/Thumb'].mw-halign-left,
figure[typeof~='mw:Audio/Thumb'].mw-halign-left,
figure[typeof~='mw:Image/Frame'].mw-halign-left,
figure[typeof~='mw:Video/Frame'].mw-halign-left,
figure[typeof~='mw:Audio/Frame'].mw-halign-left {
  /* @noflip */
  margin: 0.5em 1.4em 1.3em 0;
  /* @noflip */
  clear: left;
  /* @noflip */
  float: left;
}
figure[typeof~='mw:Image/Thumb'].mw-halign-none,
figure[typeof~='mw:Video/Thumb'].mw-halign-none,
figure[typeof~='mw:Audio/Thumb'].mw-halign-none,
figure[typeof~='mw:Image/Frame'].mw-halign-none,
figure[typeof~='mw:Video/Frame'].mw-halign-none,
figure[typeof~='mw:Audio/Frame'].mw-halign-none {
  /* Override the default margin from mw-content-xxx above */
  margin: 0;
  margin-bottom: 0.5em;
  clear: none;
  float: none;
}
figure[typeof~='mw:Image/Thumb'].mw-halign-center,
figure[typeof~='mw:Video/Thumb'].mw-halign-center,
figure[typeof~='mw:Audio/Thumb'].mw-halign-center,
figure[typeof~='mw:Image/Frame'].mw-halign-center,
figure[typeof~='mw:Video/Frame'].mw-halign-center,
figure[typeof~='mw:Audio/Frame'].mw-halign-center {
  /* Override the default margin from mw-content-xxx above
		 * And, matches *.center * in element.css
		 */
  margin: 0 auto 0.5em auto;
  clear: none;
  float: none;
}
figure[typeof~='mw:Image/Thumb'] > *:first-child,
figure[typeof~='mw:Video/Thumb'] > *:first-child,
figure[typeof~='mw:Audio/Thumb'] > *:first-child,
figure[typeof~='mw:Image/Frame'] > *:first-child,
figure[typeof~='mw:Video/Frame'] > *:first-child,
figure[typeof~='mw:Audio/Frame'] > *:first-child {
  /* Broken media get a span instead */
}
figure[typeof~='mw:Image/Thumb'] > *:first-child > audio,
figure[typeof~='mw:Video/Thumb'] > *:first-child > audio,
figure[typeof~='mw:Audio/Thumb'] > *:first-child > audio,
figure[typeof~='mw:Image/Frame'] > *:first-child > audio,
figure[typeof~='mw:Video/Frame'] > *:first-child > audio,
figure[typeof~='mw:Audio/Frame'] > *:first-child > audio,
figure[typeof~='mw:Image/Thumb'] > *:first-child > img,
figure[typeof~='mw:Video/Thumb'] > *:first-child > img,
figure[typeof~='mw:Audio/Thumb'] > *:first-child > img,
figure[typeof~='mw:Image/Frame'] > *:first-child > img,
figure[typeof~='mw:Video/Frame'] > *:first-child > img,
figure[typeof~='mw:Audio/Frame'] > *:first-child > img,
figure[typeof~='mw:Image/Thumb'] > *:first-child > video,
figure[typeof~='mw:Video/Thumb'] > *:first-child > video,
figure[typeof~='mw:Audio/Thumb'] > *:first-child > video,
figure[typeof~='mw:Image/Frame'] > *:first-child > video,
figure[typeof~='mw:Video/Frame'] > *:first-child > video,
figure[typeof~='mw:Audio/Frame'] > *:first-child > video {
  margin: 3px;
}
figure[typeof~='mw:Image/Thumb'] > *:first-child > span,
figure[typeof~='mw:Video/Thumb'] > *:first-child > span,
figure[typeof~='mw:Audio/Thumb'] > *:first-child > span,
figure[typeof~='mw:Image/Frame'] > *:first-child > span,
figure[typeof~='mw:Video/Frame'] > *:first-child > span,
figure[typeof~='mw:Audio/Frame'] > *:first-child > span {
  display: inline-block;
  /* The extra horizontal margin here is to make up for the lack of a border */
  margin: 3px 4px;
  /* This is hardcoded in Linker::makeThumbLink2 for broken media */
  width: 180px;
  /* Styles the text of broken media */
  font-size: 94%;
}
figure[typeof~='mw:Image/Thumb'] > figcaption,
figure[typeof~='mw:Video/Thumb'] > figcaption,
figure[typeof~='mw:Audio/Thumb'] > figcaption,
figure[typeof~='mw:Image/Frame'] > figcaption,
figure[typeof~='mw:Video/Frame'] > figcaption,
figure[typeof~='mw:Audio/Frame'] > figcaption {
  display: table-caption;
  caption-side: bottom;
  line-height: 1.4em;
  /**
		 * The "break-word" value is deprecated, however, it's well supported
		 * at 94.73%
		 * https://caniuse.com/mdn-css_properties_word-break_break-word
		 *
		 * The spec suggests it has the same effect as,
		 *
		 *   word-break: normal;
		 *   overflow-wrap: anywhere;
		 *
		 * https://drafts.csswg.org/css-text-3/#word-break-property
		 *
		 * So, we should use that.  However, support for "anywhere" is lagging
		 * at just 72.39%, with Safari being a notable miss.
		 * https://caniuse.com/mdn-css_properties_overflow-wrap_anywhere
		 *
		 * "Soft wrap opportunities introduced by the word break are considered
		 * when calculating min-content intrinsic sizes."
		 * From https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap
		 */
  word-break: break-word;
  /* taken from .thumbcaption, plus .thumbinner */
  padding: 0 6px 6px 6px;
}
.mw-content-ltr figure[typeof~='mw:Image/Thumb'] > figcaption,
.mw-content-ltr figure[typeof~='mw:Video/Thumb'] > figcaption,
.mw-content-ltr figure[typeof~='mw:Audio/Thumb'] > figcaption,
.mw-content-ltr figure[typeof~='mw:Image/Frame'] > figcaption,
.mw-content-ltr figure[typeof~='mw:Video/Frame'] > figcaption,
.mw-content-ltr figure[typeof~='mw:Audio/Frame'] > figcaption {
  /* @noflip */
  text-align: left;
}
.mw-content-rtl figure[typeof~='mw:Image/Thumb'] > figcaption,
.mw-content-rtl figure[typeof~='mw:Video/Thumb'] > figcaption,
.mw-content-rtl figure[typeof~='mw:Audio/Thumb'] > figcaption,
.mw-content-rtl figure[typeof~='mw:Image/Frame'] > figcaption,
.mw-content-rtl figure[typeof~='mw:Video/Frame'] > figcaption,
.mw-content-rtl figure[typeof~='mw:Audio/Frame'] > figcaption {
  /* @noflip */
  text-align: right;
}
/**
 * Inline media items
 */
.mw-valign-middle > *:first-child > audio,
.mw-valign-middle > *:first-child > img,
.mw-valign-middle > *:first-child > video {
  vertical-align: middle;
}
.mw-valign-baseline > *:first-child > audio,
.mw-valign-baseline > *:first-child > img,
.mw-valign-baseline > *:first-child > video {
  vertical-align: baseline;
}
.mw-valign-sub > *:first-child > audio,
.mw-valign-sub > *:first-child > img,
.mw-valign-sub > *:first-child > video {
  vertical-align: sub;
}
.mw-valign-super > *:first-child > audio,
.mw-valign-super > *:first-child > img,
.mw-valign-super > *:first-child > video {
  vertical-align: super;
}
.mw-valign-top > *:first-child > audio,
.mw-valign-top > *:first-child > img,
.mw-valign-top > *:first-child > video {
  vertical-align: top;
}
.mw-valign-text-top > *:first-child > audio,
.mw-valign-text-top > *:first-child > img,
.mw-valign-text-top > *:first-child > video {
  vertical-align: text-top;
}
.mw-valign-bottom > *:first-child > audio,
.mw-valign-bottom > *:first-child > img,
.mw-valign-bottom > *:first-child > video {
  vertical-align: bottom;
}
.mw-valign-text-bottom > *:first-child > audio,
.mw-valign-text-bottom > *:first-child > img,
.mw-valign-text-bottom > *:first-child > video {
  vertical-align: text-bottom;
}
/* stylelint-disable selector-class-pattern */
/**
 * Avoid the need to calculate paddings individually
 * https://stackoverflow.com/a/7310398
 *
 * FIXME: This would be better in mediawiki.page.gallery.styles,
 * but let's wait until wgParserEnableLegacyMediaDOM is removed
 */
.mw-gallery-traditional .gallerybox > .thumb:before {
  content: '';
  vertical-align: middle;
  display: inline-block;
  height: 100%;
}
.mw-gallery-traditional .gallerybox > .thumb > * {
  vertical-align: middle;
  display: inline-block;
}

figure[typeof~='mw:Image/Thumb'],
figure[typeof~='mw:Video/Thumb'],
figure[typeof~='mw:Audio/Thumb'],
figure[typeof~='mw:Image/Frame'],
figure[typeof~='mw:Video/Frame'],
figure[typeof~='mw:Audio/Frame'] {
  border: 1px solid #c8ccd1;
  border-bottom: 0;
  background-color: #f8f9fa;
}
figure[typeof~='mw:Image/Thumb'] > *:first-child > audio,
figure[typeof~='mw:Video/Thumb'] > *:first-child > audio,
figure[typeof~='mw:Audio/Thumb'] > *:first-child > audio,
figure[typeof~='mw:Image/Frame'] > *:first-child > audio,
figure[typeof~='mw:Video/Frame'] > *:first-child > audio,
figure[typeof~='mw:Audio/Frame'] > *:first-child > audio,
figure[typeof~='mw:Image/Thumb'] > *:first-child > img,
figure[typeof~='mw:Video/Thumb'] > *:first-child > img,
figure[typeof~='mw:Audio/Thumb'] > *:first-child > img,
figure[typeof~='mw:Image/Frame'] > *:first-child > img,
figure[typeof~='mw:Video/Frame'] > *:first-child > img,
figure[typeof~='mw:Audio/Frame'] > *:first-child > img,
figure[typeof~='mw:Image/Thumb'] > *:first-child > video,
figure[typeof~='mw:Video/Thumb'] > *:first-child > video,
figure[typeof~='mw:Audio/Thumb'] > *:first-child > video,
figure[typeof~='mw:Image/Frame'] > *:first-child > video,
figure[typeof~='mw:Video/Frame'] > *:first-child > video,
figure[typeof~='mw:Audio/Frame'] > *:first-child > video {
  border: 1px solid #c8ccd1;
  background: #ffffff;
}
figure[typeof~='mw:Image/Thumb'] > figcaption,
figure[typeof~='mw:Video/Thumb'] > figcaption,
figure[typeof~='mw:Audio/Thumb'] > figcaption,
figure[typeof~='mw:Image/Frame'] > figcaption,
figure[typeof~='mw:Video/Frame'] > figcaption,
figure[typeof~='mw:Audio/Frame'] > figcaption {
  border: 1px solid #c8ccd1;
  border-top: 0;
  background-color: #f8f9fa;
  /* In mw-core the font-size is duplicated, 94% in thumbinner
		 * and again 94% in thumbcaption. 88.4% for font size of the
		 * caption results in the same behavior. */
  font-size: 88.4%;
}
.mw-image-border > *:first-child > audio,
.mw-image-border > *:first-child > img,
.mw-image-border > *:first-child > video {
  border: 1px solid #eaecf0;
}
/* Magnify clip, not present for broken media */
figure[typeof~='mw:Image/Thumb']:not( [ typeof~='mw:Error' ] ) > figcaption:before,
figure[typeof~='mw:Video/Thumb']:not( [ typeof~='mw:Error' ] ) > figcaption:before,
figure[typeof~='mw:Audio/Thumb']:not( [ typeof~='mw:Error' ] ) > figcaption:before {
  content: '';
  width: 15px;
  height: 11px;
}
.mw-content-ltr figure[typeof~='mw:Image/Thumb']:not( [ typeof~='mw:Error' ] ) > figcaption:before,
.mw-content-ltr figure[typeof~='mw:Video/Thumb']:not( [ typeof~='mw:Error' ] ) > figcaption:before,
.mw-content-ltr figure[typeof~='mw:Audio/Thumb']:not( [ typeof~='mw:Error' ] ) > figcaption:before {
  /* @noflip */
  margin-left: 3px;
  /* @noflip */
  float: right;
}
.mw-content-rtl figure[typeof~='mw:Image/Thumb']:not( [ typeof~='mw:Error' ] ) > figcaption:before,
.mw-content-rtl figure[typeof~='mw:Video/Thumb']:not( [ typeof~='mw:Error' ] ) > figcaption:before,
.mw-content-rtl figure[typeof~='mw:Audio/Thumb']:not( [ typeof~='mw:Error' ] ) > figcaption:before {
  /* @noflip */
  margin-right: 3px;
  /* @noflip */
  float: left;
}
figure[typeof~='mw:Image/Thumb']:not( [ typeof~='mw:Error' ] ) > a,
figure[typeof~='mw:Video/Thumb']:not( [ typeof~='mw:Error' ] ) > a,
figure[typeof~='mw:Audio/Thumb']:not( [ typeof~='mw:Error' ] ) > a {
  display: inline-block;
  position: relative;
}
figure[typeof~='mw:Image/Thumb']:not( [ typeof~='mw:Error' ] ) > a:after,
figure[typeof~='mw:Video/Thumb']:not( [ typeof~='mw:Error' ] ) > a:after,
figure[typeof~='mw:Audio/Thumb']:not( [ typeof~='mw:Error' ] ) > a:after {
  content: '';
  width: 15px;
  height: 11px;
  position: absolute;
  bottom: -11px;
}
.mw-content-ltr figure[typeof~='mw:Image/Thumb']:not( [ typeof~='mw:Error' ] ) > a:after,
.mw-content-ltr figure[typeof~='mw:Video/Thumb']:not( [ typeof~='mw:Error' ] ) > a:after,
.mw-content-ltr figure[typeof~='mw:Audio/Thumb']:not( [ typeof~='mw:Error' ] ) > a:after {
  /* @noflip */
  right: 6px;
  /* @noflip */
  background-image: url(/resources/src/mediawiki.skinning/images/magnify-clip-ltr.svg?8330e);
}
.mw-content-rtl figure[typeof~='mw:Image/Thumb']:not( [ typeof~='mw:Error' ] ) > a:after,
.mw-content-rtl figure[typeof~='mw:Video/Thumb']:not( [ typeof~='mw:Error' ] ) > a:after,
.mw-content-rtl figure[typeof~='mw:Audio/Thumb']:not( [ typeof~='mw:Error' ] ) > a:after {
  /* @noflip */
  left: 6px;
  /* @noflip */
  background-image: url(/resources/src/mediawiki.skinning/images/magnify-clip-rtl.svg?38fd5);
}
